package edu.ustb.efws.pipeline.domain;

import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.Objects;
import java.util.StringJoiner;

/**
 * 空压机
 *
 * @author TS Group
 */
public class Kyj {
    @ApiModelProperty("编号")
    private Long id;
    @ApiModelProperty("传感器编号")
    private Integer detectorId;
    @ApiModelProperty("电流1")
    private Float i1;
    @ApiModelProperty("电流2")
    private Float i2;
    @ApiModelProperty("电流3")
    private Float i3;
    @ApiModelProperty("采集时间")
    private Date time;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getDetectorId() {
        return detectorId;
    }

    public void setDetectorId(Integer detectorId) {
        this.detectorId = detectorId;
    }

    public Float getI1() {
        return i1;
    }

    public void setI1(Float i1) {
        this.i1 = i1;
    }

    public Float getI2() {
        return i2;
    }

    public void setI2(Float i2) {
        this.i2 = i2;
    }

    public Float getI3() {
        return i3;
    }

    public void setI3(Float i3) {
        this.i3 = i3;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Kyj kyj = (Kyj) o;
        return Objects.equals(id, kyj.id) && Objects.equals(detectorId, kyj.detectorId) && Objects.equals(i1, kyj.i1) && Objects.equals(i2, kyj.i2) && Objects.equals(i3, kyj.i3) && Objects.equals(time, kyj.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, detectorId, i1, i2, i3, time);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Kyj.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("detectorId=" + detectorId)
                .add("i1=" + i1)
                .add("i2=" + i2)
                .add("i3=" + i3)
                .add("time=" + time)
                .toString();
    }
}
